<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
			    xmlns:ui="http://java.sun.com/jsf/facelets"
			    xmlns:h="http://java.sun.com/jsf/html"
			    xmlns:f="http://java.sun.com/jsf/core"
			    xmlns:sec="http://www.condominioceleste.com/security/facelets/tags"    
			    template="./template/template_login.xhtml">
    
    <ui:define name="title">
        Editar Aviso
    </ui:define>
    
    <ui:define name="content">    				
			<h:outputScript library="js" name="analytics.js" target="head" />
    		<h:form id="editarAvisoForm">
    		    				    				
				<h:panelGrid  cellspacing="1" border="0" 
							  bgcolor="#CCCCC0" columns="2" columnClasses="etiqueta,etiqueta_campo"							  
							  headerClass="titulocolumna" footerClass="columnadatoPar">
														
					<f:facet name="header">
						<h:outputText value="Editar Aviso" />  
					 </f:facet>		  							  							
					
					<h:outputText value="Tipo de Aviso" />
					<h:panelGroup>						
						<h:panelGroup>
							<h:selectOneMenu id="tipoAviso" value="#{noticesBean.editView.typeNoticeId}"  styleClass="campo_texto" >
								<f:ajax render="@none" execute="@this" />
								<f:selectItems value="#{noticesBean.noticesCatalogList}" />
							</h:selectOneMenu>															
						</h:panelGroup>
					</h:panelGroup>	
					
					<h:outputText value="Titulo" />					
					<h:inputText id="tituloId" styleClass="campo_texto" value="#{noticesBean.editView.title}" required="true" requiredMessage="El titulo es requerido." onfocus="this.select();" />						
					
																							
					<h:outputText value="Detalle" />					
					<h:inputTextarea id="detalleId" styleClass="campo_texto" maxlength="500" value="#{noticesBean.editView.detail}" 
											required="true" requiredMessage="El detalle es requerido." 
												validatorMessage="El detalle debe de contener por lo menos 10 caracteres y un maximo de 500." 
													onfocus="this.select();" cols="50" rows="10">
						<f:validateLength minimum="10" maximum="500"/>
					</h:inputTextarea>															
					
					<f:facet name="footer">
					    <h:panelGroup style="text-align:right">	
					      <sec:submodulo modulo="AVISOS" submodulo="EDT">				      
					      	<h:commandButton id="submit" styleClass="boton" value="Editar" action="#{noticesBean.editNotices}" />&#160;&#160;
					      </sec:submodulo>
					      <h:commandButton id="back" styleClass="boton" value="Regresar" action="#{noticesBean.goBackAction}" immediate="true" />	
					    </h:panelGroup>
					 </f:facet>
										
				</h:panelGrid>
				
			</h:form>
	</ui:define>
    
</ui:composition>